﻿@using AP.Framework.Infrastructure.Repositories
@using AP.Framework.Infrastructure.Database
@{
    ApContext context = new ApContext();
    ArticleRepository article = new ArticleRepository(context);
    ChannelRepository channel = new ChannelRepository(context);
    var hdList = article.GetAll().Where(p => p.DisplayStyle == 2).OrderBy(p => p.Sequence).Take(10).ToList();
}
<!DOCTYPE html>
<html>
<head>
    <title>东莞市奕鸣电子有限公司</title>
    <meta content="东莞市奕鸣电子有限公司,奕鸣电子,奕鸣,电子有限公司" name="Keywords">
    <link href="@Url.Content("~/Content/themes/Web960/css/reset.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/Web960/css/text.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/Web960/css/min/960.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/Web960/css/demo.css")" rel="stylesheet" type="text/css" />
    <!-- 菜单 -->
    <link href="@Url.Content("~/Content/themes/Meun/css/menu.css")" rel="stylesheet" type="text/css" />
    <!-- 幻灯片 -->
    <link href="@Url.Content("~/Content/themes/Slider/themes/default/default.css")" rel="stylesheet"
        type="text/css" />
    <link href="@Url.Content("~/Content/themes/Slider/themes/light/light.css")" rel="stylesheet"
        type="text/css" />
    <link href="@Url.Content("~/Content/themes/Slider/themes/dark/dark.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/Slider/themes/bar/bar.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/themes/Slider/nivo-slider.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Content/themes/Slider/scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/themes/Slider/scripts/jquery.nivo.slider.pack.js")" type="text/javascript"></script>
    <link href="@Url.Content("~/Content/themes/WebSite/css/main.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        $(window).load(function () {
            $('#slider').nivoSlider();
        });
    </script>
</head>
<body>
    <!-- end .container_12 -->
    <div class="container_16">
        <div class="grid_6">
            <img src="@Url.Content("~/Content/themes/WebSite/images/logo.gif")" alt="logo" />
        </div>
        <!-- end .grid_4 -->
        <div class="grid_10" style="height: 59px;">
            
        </div>
        <!-- end .grid_12 -->
        <div class="clear">
        </div>
        <div class="grid_16" style="background: Teal;">
            <ul id="navList">
                @{
                    var channelList = channel.GetAll().Where(p => p.ParentID == 0 && p.IsDisable == false).OrderBy(p => p.Sequence).ToList();
                    foreach (var cha in channelList)
                    {
                    <li>
                        @Html.ActionLink(cha.ChannelName, cha.ChannelAction, cha.ChannelController, new { area = cha.ChannelArea }, new { @class = "menu" })
                    </li>                       
                    }
                }
            </ul>
        </div>
        <br />
        <!-- end .grid_16 -->
        <div class="clear">
        </div>
        <div class="grid_16">
            <div id="wrapper">
                <div class="slider-wrapper theme-default">
                    <div id="slider" class="nivoSlider">
                        @{    
                            foreach (var list in hdList)
                            {
                            <img src="@list.ImageUrl" data-thumb="@list.ImageUrl"
                            alt="" title="@list.Title" />
                            }
                                
                        }
                    </div>
                </div>
            </div>
        </div>
        <!-- end .grid_16 -->
        <div class="clear">
        </div>
        @RenderBody()
        <div class="grid_16">
            <hr />
            <p>
                Copyright ©东莞市奕鸣电子有限公司 &nbsp;&nbsp;<a href="http://www.miibeian.gov.cn" target="_blank">粤ICP证12076140号</a>
                <br />
                <br />
            </p>
        </div>
        <!-- end .grid_16 -->
        <div class="clear">
        </div>
    </div>
</body>
</html>
